import op from '@dfeidao/atom-nodejs/db/operate';
import { IncomingHttpHeaders } from 'http';
import { productid, systemid } from '../../atom/config';
interface Message {
	meeting_no: string;
}



export default async function atom(message: Message, action_id: string, session_id: string, headers: IncomingHttpHeaders) {

	const { exec, del } = op(action_id, session_id, systemid);
	// 删除数据
	del('meeting_administration', { productid, meeting_no: message.meeting_no });
	del('conference_annex', { productid, meeting_no: message.meeting_no });
	del('meeting_conclusion', { productid, meeting_no: message.meeting_no });
	del('conclusion_annex', { productid, meeting_no: message.meeting_no });
	del('participants', { productid, meeting_no: message.meeting_no });
	const ret = await exec();
	return ret;
}
